@echo off
REM 在windows开发环境下条件编译成linux程序--自定更换git_server_url和build_server_dir
set build_server_dir=D:\data\release\pub_qr_server\server
set go_server_name=server

go env -w  CGO_ENABLED=0
go env   -w GOOS=linux
cd ../../
go build %go_server_name%
go env -w  CGO_ENABLED=1
go env   -w GOOS=windows


REM 复制文件到发行目录
copy  %go_server_name% %build_server_dir%
xcopy /E /I /Y "static\images" "%build_server_dir%\static\images"
xcopy /E /I /Y "static\assets" "%build_server_dir%\static\assets"
xcopy /E /I /Y "static\docs" "%build_server_dir%\static\docs"
xcopy /E /I /Y "templates" "%build_server_dir%\templates"

